Information processing apparatuses, such as computers, sometimes measure time for, for example, time-out processing. The information processing apparatuses measure time by counting clock pulses from hardware that oscillates at a predetermined frequency. Specifically, an application that requires time measurement notifies an OS of its desired time to be measured. When the desired time elapses, the application is notified.
When time processing is performed in an information processing apparatus, the OS counts clock pulses in almost all cases. However, if the OS is a versatile OS that performs a plurality of processes simultaneously, time measurement may be delayed depending on the processing status of the versatile OS.
A technology is described in Japanese Laid-open Patent Publication No. 10-253778 in which a task waiting time corresponding to the processing status of a central processing unit (CPU) is added to a requested adjustment time and the timing of a clock device is adjusted accordingly. In this technology, the timing of the clock device can be accurately adjusted in consideration of any process delay that varies depending on the processing status of the versatile OS in the CPU.
When time is measured for, for example, time-out processing, any process delay needs to be taken into consideration before time is measured. Therefore, in the technology disclosed in Japanese Laid-open Patent Publication No. 10-253778, in which an adjustment time is corrected based on the actual process delay, the time is not accurately measured. For example, as represented in FIG. 1, if an application requests a versatile OS to measure a desired time, a delay time depending on the processing status of the versatile OS may be caused due to another process. In such a case, the desired time requested by the application is actually measured after the process load due to another process is reduced. This means that the application is notified that the desired time has elapsed at a timing that is delayed relative to the requested time for the delay time.
This means that in reality, if the application requests the versatile OS to measure, for example, three seconds in order to perform time-out processing after three seconds, the application is notified that the desired time (three seconds) has elapsed after, for example, 3.5 seconds due to a process delay in the versatile OS. In the technology disclosed in Japanese Laid-open Patent Publication No. 10-253778, the measured time is corrected based on the actual process delay. For this reason, although it is possible to notify the application that 3.5 seconds have elapsed since the request was made by the application, it is not possible to notify the application at three seconds that three seconds have elapsed since the request was made by the application.
To deal with the above problem, the versatile OS may be modified so that it becomes a dedicated OS that performs time measurement accurately. In this case, however, an advantage of the versatile OS, i.e., throughput enhancement is lost, and modifying and maintaining the OS increases costs.